package com.tjetc.view.impl;

import com.tjetc.controller.HotelController;
import com.tjetc.utils.ScannerUtils;
import com.tjetc.view.HotelInfoPage;

import static com.tjetc.constant.CommonConstant.COMMAND_ERROR;

/**
 * @Author: itda
 * @Date: 2024/5/10 15:38
 * @Description: HotelInfoPageImpl
 */
public class HotelInfoPageImpl implements HotelInfoPage {

    private HotelController hotelController = new HotelController();

    @Override
    public void show() {
        while (true) {
            System.out.println("酒店信息页面");
            System.out.println("1.酒店的基本信息");
            System.out.println("2.房间的基本信息");
            System.out.println("3.返回");
            System.out.println("请选择:");
            switch (ScannerUtils.sc.nextInt()) {
                case 1:
                    hotelController.info();
                    break;
                case 2:
                    hotelController.room();
                case 3:
                    return;
                default:
                    System.out.println(COMMAND_ERROR);
                    break;
            }
        }
    }
}
